home *** CD-ROM | disk | FTP | other *** search
/ 10,000 Great Games / 10,000 Great Games.iso / Product / 66 / data1.cab / Source_Files / Src / MstructDlg.cpp < prev    next >
C/C++ Source or Header  |  2000-01-16  |  794b  |  44 lines

  1. #include "stdafx.h"
  2. #include "MstructDlg.h"
  3.  
  4. CMstructDlg::CMstructDlg(cMovingStructure *_mstruct, CWnd* pParent)
  5.     : CDialog(CMstructDlg::IDD, pParent)
  6. {
  7.     mstruct = _mstruct;
  8.  
  9.     //{{AFX_DATA_INIT(CMstructDlg)
  10.     //}}AFX_DATA_INIT
  11. }
  12.  
  13.  
  14. void CMstructDlg::DoDataExchange(CDataExchange* pDX)
  15. {
  16.     CDialog::DoDataExchange(pDX);
  17.     //{{AFX_DATA_MAP(CMstructDlg)
  18.     DDX_Control(pDX, IDC_MSTRUCT_SPEED, m_Speed);
  19.     //}}AFX_DATA_MAP
  20. }
  21.  
  22. BEGIN_MESSAGE_MAP(CMstructDlg, CDialog)
  23.     //{{AFX_MSG_MAP(CMstructDlg)
  24.     //}}AFX_MSG_MAP
  25. END_MESSAGE_MAP()
  26.  
  27. BOOL CMstructDlg::OnInitDialog() 
  28. {
  29.     CDialog::OnInitDialog();
  30.     
  31.     m_Speed.SetRange(25, 200);
  32.     m_Speed.SetPos(mstruct->speed);
  33.     
  34.     return TRUE;
  35. }
  36.  
  37. void CMstructDlg::OnOK() 
  38. {
  39.     mstruct->speed = m_Speed.GetPos();
  40.  
  41.     CDialog::OnOK();
  42. }
  43.  
  44.